#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <math.h>
#include <string.h>
char ch[1025][1025] = { 0 };
int main()
{
	int n = 0;
	scanf("%d", &n);
	memset(ch, '1', sizeof(ch));
	int x = n;
	for (int i = 0; i < n; i++)
	{
		int x1 = pow(2, i);
		int y1 = pow(2, i);
		for (int x = 0; x < x1; x++)
		{
			for (int y = 0; y < y1; y++)
			{
				ch[x + x1][y] = ch[x][y];
				ch[x][y + y1] = ch[x][y];
				ch[x + x1][y + y1] = '0';
			}
		}
	}
	for (int i = pow(2, n) - 1; i >= 0; i--)
	{
		for (int j = pow(2, n) - 1; j >= 0; j--)
		{
			printf("%c ", ch[i][j]);
		}
		printf("\n");
	}
	return 0;
}